var jqGetAjaxPromise = function(url, query, method, param) {
  return new Promise(function(resolve, reject) {
    var options = {
      url: url,
      type: method || "get",
      success: function(data) {
        resolve(data);
      },
      error: function(error) {
        reject(error);
      }
    }
    if (query) {
      options.url += qs.stringify(query, {addQueryPrefix: true});
    }
    if (param) {
      options.contentType = 'application/json';
      options.data = param;
      console.log(param)
    }
    $.ajax(options);
  });
};
// var ret = getOrganizationList();
// ret.then(function (data) {
//   console.log(data)
//   
// }).catch(function (err) {
//   console.log(err)
// });
$.fn.serializeObject = function () {
  var o = {};
  var a = this.serializeArray();
  $.each(a, function () {
    if (o[this.name]) {
      if (!o[this.name].push) {
        o[this.name] = [o[this.name]];
      }
      o[this.name].push(this.value || '');
    } else {
      o[this.name] = this.value || '';
    }
  });
  return o;
};